import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";

export default class Test extends Component {
  static navigationOptions = {
    title: "首頁"
  };

  render() {
    const { navigate } = this.props.navigation;
    return (
      <View>
        <Text
          style={styles.red}
          onPress={() => navigate("App", { name: "test" })}
        >
          just sred
        </Text>
        <Text style={styles.bigBlue}>just bigblue</Text>
        <Text style={[styles.bigBlue, styles.sred]}>bigblue, then red</Text>
        <Text style={[styles.red, styles.bigBlue]}>ren ,then gigblue</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  bigBlue: {
    // color: "blue",
    fontWeight: "bold",
    fontSize: 30
  },
  red: {
    // color: "red"
  }
});

// AppRegistry.registerComponent("test", () => Test);
